home *** CD-ROM | disk | FTP | other *** search
- unit My1stexp;
- interface
- uses
- WinTypes, Dialogs, ExptIntf;
-
- Type
- TMy1stExp = class(TIExpert)
- public
- { Expert Style }
- function GetStyle: TExpertStyle; override;
-
- { Expert Strings }
- function GetName: string; override;
- function GetComment: string; override;
- function GetGlyph: HBITMAP; override;
- function GetState: TExpertState; override;
- function GetIDString: string; override;
- function GetMenuText: string; override;
-
- { Launch the Expert }
- procedure Execute; override;
- end;
-
- procedure Register;
-
- implementation
-
- function TMy1stExp.GetStyle: TExpertStyle;
- begin
- Result := esStandard
- end;
-
- function TMy1stExp.GetName: String;
- begin
- Result := 'My First Expert'
- end;
-
- function TMy1stExp.GetComment: String;
- begin
- Result := '' { not needed for esStandard }
- end;
-
- function TMy1stExp.GetGlyph: HBITMAP;
- begin
- Result := 0 { not needed for esStandard }
- end;
-
- function TMy1stExp.GetState: TExpertState;
- begin
- Result := [esEnabled]
- end;
-
- function TMy1stExp.GetIDString: String;
- begin
- Result := 'DrBob.MyFirstExpert'
- end;
-
- function TMy1stExp.GetMenuText: String;
- begin
- Result := '&My First Expert...'
- end;
-
- procedure TMy1stExp.Execute;
- begin
- MessageDlg('Hello World: My First Expert is alive!',
- mtInformation, [mbOk], 0)
- end;
-
- procedure Register;
- begin
- RegisterLibraryExpert(TMy1stExp.Create)
- end;
-
- end.
-